package com.example.travelservlet.commentDynamic.dao;


import com.example.travelservlet.entity.Comment;
import com.example.travelservlet.entity.Dynamic;
import com.example.travelservlet.entity.DynamicComment;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author hxy
 * @date 2023/5/16 9:04
 */
@Mapper
@Repository
public interface CommentDynamicMapper {

    Integer insertDynamicComment(DynamicComment dynamicComment);

    List<DynamicComment> findDynamicCommentByDynamicId(String dynamicId);

    Dynamic findDynamicByDynamicId(String id);

    List<DynamicComment> findAllDynamicComments();
    List<DynamicComment> findAllDynamicComments1(int page,int size);

    List<DynamicComment> findCommentsByKeyWord(String key);

    void deleteDynamicCommentById(String commentId);

    List<DynamicComment> findCommentsByKeyWord1(@Param("key") String key, @Param("page") Integer page, @Param("size") Integer size);
}
